1. Field of the Invention
The present invention relates to a derived database processing system in a database processing device, and more particularly, to a derived database processing system including a plurality of independent databases which can provide a plurality of users with a group of data to be shared for a common purpose.
2. Description of the Related Art
As demand for a high performance database management system rises, an efficient technology realizing an extensive and flexible processing system for a database is required.
For example, in the standard of an SQL (Structured Query Language) language which is a computer language for a database (for example, a database language SQL JISX3005-1990), defines a database defined as a collection of all data defined by a plurality of schemata in a single environment. Therefore, one application program accesses one database.
However, in the actual application (environment) of a database, a conventional concept of a database according to such an SQL standard has many difficulties. That is, diversified processes covering a plurality of databases are required as follows:
1 a process among independently developed databases; PA1 2 a process among a division database and a central database; PA1 3 a process among databases having the same schema structure but operated independently; PA1 4 a process among a private database and a shared database; PA1 5 a process between test data and a production database. PA1 1 Among independently developed databases, such processes as a cross-reference of a table among databases, transmission of data, or update of data cannot be performed simultaneously by the same application program. PA1 2 Between a divisional database and a central database adjustment of data is difficult, and it is very difficult to make adjustment among all divisional databases. PA1 3 Among independently developed databases having the same schema structure, one application program cannot access data which is distributed to a plurality of databases and stored in tables having the same definition. PA1 4 Between a private database and a shared database, data cannot be accessed simultaneously by one application program, which causes undesirable influence on the operation. PA1 5 Between test data and a production database, a test cannot be conducted using a production database with test data intermixed with a production database. PA1 a dictionary for managing database logical definition information and database storage information in a secondary memory, PA1 a derived database registering unit for determining a definition frame of a new name without violating a definition frame of a name used in a schema definition which defines data in a database, and, for registering to said dictionary, database selection information corresponding to a derived database having semantic consistency among tables in said database, selection information relating to components of a selected database, and alias specification information for specifying an alias for a name used in said database, PA1 a dictionary information manipulating unit for referring to said dictionary when the manipulation target is a derived database, then selecting necessary components of said database, and replacing said alias, if any, with an original name, and PA1 a database processing procedure generating unit, in a binding process to optimize access routing in a database, for generating a database processing procedure using a partial collection of storage components of a plurality of databases provided by a derived database information registered in said dictionary, by which an application program to access a plurality of databases is enabled. PA1 a definition modification managing unit for managing each definition element of definition information of an old version of a database, definition information of a new version of said database as being undetermined, and the relation between said information, and PA1 an access selecting unit for selecting, in response to an access request, an access using definition information of an old version, or an access using definition information of a new version as being undetermined. In the present invention PA1 during the modification process, the definition information of an old version of a database, the definition information of a new version of the database, and the relation between them can be managed, and the old version information is replaced with the new version information by a mechanism provided in a database management system.
Therefore the term database and its plural is used herein to enable the discussion of the diversified processes mentioned above.
Ordinarily, in the process where a plurality of databases are accessed, countermeasures are taken properly according to each situation.
For example, when a plurality of divisional databases, each developed independently, are accessed ordinarily, they are accessed according to the following methods:
The first method is to integrate defined schemata to rebuild them into one database through which application programs can share data therein.
The second method is to make independent division databases from defined schemata. An application program is generated for each division, and the communication of application programs among a plurality of databases is performed by the transmission of data through common files.
The above described actions burden processes such as rebuilding a database and developing an application program.
That is, an object of a database is to share data, eliminate redundant data, and clear the semantic inconsistency among data. Generatng a database from defined schemata may be one way to accomplish this object. However, the fact is that a database must be developed in a divisional manner for each independent job of a division, development term, and scale of development. Accordingly, generating a single database from all data often proves to be an unreasonable job.
In the prior art technology, an application program can access only one database. Being unable to access a plurality databases, the application program has the following problems:
Additionally, if a plurality of databases are used practically, names must not be duplicated among those databases. Therefore, care must be taken with respect to names in other databases, thus proscribing independent development of each database.
Defining a database means interpreting the database. The data in the database are stored in the format consistent with the interpretation based on the definition. An application program for accessing a database accesses data according to the database definition information. Thus, a definition of a database, data in a database, and an application program for accessing a database are associated with one another.
Therefore, modifying the definition of a database affects the data in a database and an application program for accessing the database. Therefore, the data in a database are frequently accessed and modified, while the definition of the database is not modified as frequently. However, to meet the requirements of manipulating a database, the modification of a database definition is inevitably required.
In this case, if a database management system provides a mechanism for supporting the modification of a definition according to a common definition modification model instead of an ordinary user-specified ad hoc method, a user's effort can be reduced when the definition is modified.
The usage of a database varies as time goes by. With the fluctuation of the amount of data stored in a database, a storage structure may be required to be modified. The change in the importance of a database and the frequency of access requests may require the modification of the storage structure.
A change in the real environment which reflects on the logical structure of the database may require the modification of the database itself. Simple examples are modification of a column attribute (an eight-digit column must be extended to a 10 digit column due to an increase in numerical size and increase of columns (FAX numbers as well as phone numbers are required). Furthermore, addition or deletion of restrictions for table integrity, and division or integration of a table may be required.
At the time when definition modification in various aspects is required, a database may have much data stored therein and be used by a number of users through application programs, which may not have been envisioned in an initial design stage of the database. Therefore, it must be confirmed before actually performing definition modification that there will be little affect on the existing systems and related jobs. If the reorganization of stored data is required for the definition modification, a period when a database cannot be processed due to the re-organization must be made as short as possible.
In an ordinary database management system, a test of the state after definition modification cannot be performed effectively unless the test system is generated on the same scale as the existing system. Besides, as a database management system does not provide a mechanism for permitting modification for each definition element based on a common definition modification model, it is difficult to perform progressive modification. Therefore, a new system must be generated after the modification.
As described above, in the prior art technology, the relation among a definition of a database, data in a database, and an application program for accessing a database is not established clearly. Therefore, the definition modifying procedure of a database is left to a user, for example, a system operator who cannot use the formatted modification procedure.
For example, the main methods which a user may adopt for definition modification are described as follows:
The first method is to stop manipulating a database completely, rebuild the database including the definition modification, and restart the operation on the database. Regeneration of data and modification of an application program may also be required. As the operation in progress must be stopped in this method, an unstable definition state can be avoided, thus ensuring the integrity of data. However, the operation must be stopped for a long time, thus causing trouble for users.
The second method is to unconditionally permit definition modification if necessary even during the operation, and effectuate the definition immediately after the modification. Against the undesirable effects of the modification, a modification of the definition must take ad hoc action. That is, a system operator must reflect the modification without stopping the operation totally by localizing the influence of the modification after fully recognizing the nature of data associated with the definition to be modified.
In the second method described above, as modification must be made on the spot, the extent of an influence of the modification can be erroneously determined, and the state prior to the modification may not be easily restored when an error occurs.